<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>能接多少杯</title>
		<link rel="icon" type="image/GIF" href="res/favicon.ico" />
		<meta name="viewport"
			content="width=device-width, minimum-scale=1, maximum-scale=1,  initial-scale=1, user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes" />
		<style>
body,canvas,div {
	-moz-user-select: none;
	-webkit-user-select: none;
	-ms-user-select: none;
	-khtml-user-select: none;
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
</style>
	</head>
	<body style="padding: 0; margin: 0; background: #000;">
		<canvas id="gameCanvas" width="640" height="960"></canvas>
		<script src="game.min.js"></script>
		<script language=javascript>
		var mebtnopenurl = 'http://www.weixin199.com/youxi';
var thegameurl ="http://www.weixin199.com/youxi/games/njdsb/"; 
var guanzhuurl ="http://mp.weixin.qq.com/s?__biz=MjM5ODQzODk0MA==&mid=200754961&idx=1&sn=343f5c361ad670bc05f6bc683da7a153#rd";
		window.shareData = {
		        "imgUrl": "http://mmbiz.qpic.cn/mmbiz/2zpp2iaH4HWFX6tke5uPDQdhox50ehxKfB0qqxrhOibc6zJKic4v2Gsc9WYylmLMumlAiaUFaibdlUoGwJ8aoaZaNiag/640",
		        "timeLineLink": thegameurl,
		        "tTitle": "能接多少杯",
		        "tContent": "不要以为谁都能接的住这水，看你能接多少杯！"
		};
				
		function goHome(){
			window.location=mebtnopenurl;
		}
		function clickMore(){
			if((window.location+"").indexOf("zf",1)>0){
				window.location = mebtnopenurl ;
			 }
			 else{
				goHome();
			 }
		}
		function dp_share(){
			document.title ="不要以为谁都能接的住这水，我也只能接了"+myData.score+"杯水，看你能有多少本事来挑战我!";
			document.getElementById("share").style.display="";
			window.shareData.tTitle = document.title;
		}
		function dp_Ranking(){
			window.location=mebtnopenurl;
		}

		function showAd(){
		}
		function hideAd(){
		}
		document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
		    
		    WeixinJSBridge.on('menu:share:appmessage', function(argv) {
		        WeixinJSBridge.invoke('sendAppMessage', {
		            "img_url": window.shareData.imgUrl,
		            "link": window.shareData.timeLineLink,
		            "desc": window.shareData.tContent,
		            "title": window.shareData.tTitle
		        }, onShareComplete);
		    });

		    WeixinJSBridge.on('menu:share:timeline', function(argv) {
		        WeixinJSBridge.invoke('shareTimeline', {
		            "img_url": window.shareData.imgUrl,
		            "img_width": "640",
		            "img_height": "640",
		            "link": window.shareData.timeLineLink,
		            "desc": window.shareData.tContent,
		            "title": window.shareData.tTitle
		        }, onShareComplete);
		    });
		}, false);
		</script>
		<div id=share style="display: none">
			<img width=100% src="share.png"
				style="position: fixed; z-index: 9999; top: 0; left: 0; display: "
				ontouchstart="document.getElementById('share').style.display='none';" />
		</div>
			<script type="text/javascript">
            var myData = { gameid: "njdsb" };
            var domain = ["oixm.cn", "hiemma.cn", "peagame.net"][parseInt(Math.random() * 3)];
			window.shareData.timeLineLink = thegameurl ;
			function dp_submitScore(score){
				myData.score = score;
				myData.scoreName = "接了"+score+"杯";
				if(score>0){
					if (confirm("您已成功的接了"+score+"杯水，分享到朋友圈和小伙伴们比比吧！")){
						dp_share();
					}
				}
			}
			function onShareComplete(res) {
                if (localStorage.myuid && myData.score != undefined) {
                    setTimeout(function(){
                        if (confirm("吗？")) {
                            window.location = mebtnopenurl ;
                        }
                        else {
                            document.location.href = mebtnopenurl;
                        }
                    }, 500);
                }
				else {
		        	document.location.href = guanzhuurl;
				}
	        }
			</script>
			<div style="display: none;">
		<!-- www.weixin199.com/youxi Baidu tongji analytics -->
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F048fdec886cd53f8bb62cee837c505c2' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F2eac95e2df0ea5d2b0aaa92e3dbbe419' type='text/javascript'%3E%3C/script%3E"));
</script>

			</div>
		
		
	</body>
</html>
